#ifndef __EKOS_KERNEL_TASK_H__
#define __EKOS_KERNEL_TASK_H__

/* The symbol is defined in kernel.S */
extern unsigned char tasks_start[];

#define TASK(_cpu) ((volatile struct taskstate_t *)(tasks_start + ((_cpu) << TS_USHIFT)))

uintptr_t get_task_ksp(cpu_id_t cpu);
void set_task_ksp(cpu_id_t cpu, uintptr_t ksp);

int task_init(void);

#endif
